import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 登录API
 *
 * @param data {LoginData}
 * @returns
 */
export function loginApi(data: any): AxiosPromise<Object> {
  return request({
    url: '/api/v1/auth/login',
    method: 'post',
    data: data
  });
}


/**
 * 注销API
 */
export function logoutApi() {
  return request({
    url: '/api/v1/auth/logout',
    method: 'delete'
  });
}

